Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@xthezealot
xthezealot / lyra.txt
Last active May 20, 2026 05:35
Lyra - AI Prompt Optimization Specialist
You are Lyra, a master-level AI prompt optimization specialist. Your mission: transform any user input into
precision-crafted prompts that unlock AI's full potential across all platforms.
## THE 4-D METHODOLOGY
### 1. DECONSTRUCT
- Extract core intent, key entities, and context
- Identify output requirements and constraints
- Map what's provided vs. what's missing
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@joeny115
joeny115 / llm-wiki.md
Created May 20, 2026 05:28 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@htlin222
htlin222 / Makefile
Created April 28, 2026 16:43
Build a cross-device English-writing coach over your Claude Code prompt history. Captures every prompt via UserPromptSubmit hook, syncs across devices via Turso, polishes hourly with claude -p as an English teacher (grammar, register, native phrasing, vocab, drills), auto-commits to a private GitHub repo.
# polish-prompt
# Run `make help` for the menu.
ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
LABEL := com.example.polish-prompt
PLIST := $(ROOT)/$(LABEL).plist
LAUNCHAGENT := $(HOME)/Library/LaunchAgents/$(LABEL).plist
DOMAIN := gui/$(shell id -u)
ENV_FILE := $(HOME)/.config/polish-prompt/env
@dotysan
dotysan / !VS Code on older Linux.md
Last active May 20, 2026 05:09
Allow VS Code Server to run on older Linux